package com.videoweb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.videoweb.model.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface CommentMapper extends BaseMapper<Comment> {
    @Select("SELECT * FROM comment WHERE video_id = #{videoId} ORDER BY created_at DESC")
    List<Comment> findByVideoIdOrderByCreatedAtDesc(Long videoId);
}

